/**
 * Copyright &copy; 2017-2020 <a href="http://www.fosung.com/">FosungFrame</a> All rights reserved.
 */
package com.fosung.frame.modules.score.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fosung.frame.common.persistence.Page;
import com.fosung.frame.common.service.CrudService;
import com.fosung.frame.modules.score.dao.PartyScoreDetailDao;
import com.fosung.frame.modules.score.entity.PartyScoreDetail;

/**
 * 党组织积分内容Service
 * @author ygl
 * @version 2017-09-03
 */
@Service
@Transactional(readOnly = true)
public class PartyScoreDetailService extends CrudService<PartyScoreDetailDao, PartyScoreDetail> {
	@Autowired
	private PartyScoreDetailDao partyScoreDetailDao;
	public PartyScoreDetail get(String id) {
		return super.get(id);
	}
	public PartyScoreDetail getSqcs(PartyScoreDetail partyScoreDetail) {
		return partyScoreDetailDao.getSqcs(partyScoreDetail);
	}
	public List<PartyScoreDetail> findList(PartyScoreDetail partyScoreDetail) {
		return super.findList(partyScoreDetail);
	}
	
	public Page<PartyScoreDetail> findPage(Page<PartyScoreDetail> page, PartyScoreDetail partyScoreDetail) {
		return super.findPage(page, partyScoreDetail);
	}
	
	@Transactional(readOnly = false)
	public void save(PartyScoreDetail partyScoreDetail) {
		super.save(partyScoreDetail);
	}
	
	@Transactional(readOnly = false)
	public void delete(PartyScoreDetail partyScoreDetail) {
		super.delete(partyScoreDetail);
	}
	
	/**
	 * 根据活动Id与积分内容ID，更新审核状态和审核积分
	 * @param partyScoreDetail
	 */
	@Transactional(readOnly = false)
	public void updateStatusAndScore(PartyScoreDetail partyScoreDetail) {
		dao.updateStatusAndScore(partyScoreDetail);
	}
	
	/**
	 * 批量同意审批积分申请
	 * @param string
	 */
	public void batchAgreePartyScoreDetail(String organizeLifeId) {
		dao.batchAgreePartyScoreDetail(organizeLifeId);
	}
	
}